﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Sagacity.NC.Web.FormForm;

namespace Sagacity.NC.Web.Sys.Log
{
    public partial class LogDetail : PageBase
    {

        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
                GetGridPanelDataBind();
        }

        public void GetGridPanelDataBind()
        {

            FormHelper formHelper = new FormHelper();
            string fieldXML = "";
            List<Sagacity.Entity.Query.FilterInfo> filterInfo = new List<Sagacity.Entity.Query.FilterInfo>();
            formHelper._currentUser = CurrentUser;
            if (!string.IsNullOrEmpty(Request["keyId"]))
            {
                string keyId = Request.QueryString["keyId"].ToString();
                filterInfo.Add(new Sagacity.Entity.Query.FilterInfo(this.hidkeyValue.Value, "=", keyId));
            }
            if (!string.IsNullOrEmpty(Request["resourceId"]))
            {
                string resourceId = Request.QueryString["resourceId"].ToString();

                filterInfo.Add(new Sagacity.Entity.Query.FilterInfo(hidResourceValue.Value, "=", resourceId));

            }
           // filterInfo.Add(new Sagacity.Entity.Query.FilterInfo("OPERATORID", "=", CurrentUser.Id));
            formHelper.SetGridEditInfo(CurrentUser.LoginRole, Convert.ToInt32(this.hidResource.Value), this.GridPanel1, Store1, filterInfo, this.hidKey.Value, winForm, pnlForm.Controls, out fieldXML, !IsPostBack, otherContent);

        }

    }
}
